package com.you07.learn.controller;

import com.you07.learn.service.RedisServiceI;
import com.you07.learn.utils.Result;
import com.you07.learn.utils.ResultMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: RedisController
 * @Author: chenguo
 * @Data: 2019年06月18日 10时00分
 * @Description:
 * @Company: 成都灵奇空间软件
 * @Version: 1.0
 */
@RestController
@RequestMapping("/redis")
public class RedisController {
    @Autowired
    private RedisServiceI redisService;

    @RequestMapping(value = "/v1/get/{key}")
    public ResultMessage<?> getKey(@PathVariable String key) {
        //String value = redisService.get(key, String.class);
        return Result.success();
    }

    @RequestMapping(value = "/v1/set/{key}/{value}")
    public ResultMessage<?> getKey(@PathVariable String key,@PathVariable String value) {
        //redisService.set(key, value);
        return Result.success();
    }
}
